﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WebApplication1
{
    public partial class WebForm2 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string username = null;
            string password = null;
            string method = Request.HttpMethod;
            Response.Write(method);
            if (method == "GET")
            {
                username = Request.QueryString["username"];
                password = Request.QueryString["password"];
            }
            if (method == "POST")
            {
                username = Request.Params["TextBox1"];
                password = Request.Params["TextBox2"];
            }
            Response.Write($"<h1>欢迎你,{username},你的密码是：{password}</ h1>");
        }
    }
}